/**
    SUSAN® - Sole of Unix Save ANything

   

   
*/

#ifndef BAREOS_FILED_EVALUATE_JOB_COMMAND_H_
#define BAREOS_FILED_EVALUATE_JOB_COMMAND_H_

#include "include/bareos.h"
#include "lib/tls_conf.h"

namespace filedaemon {

class JobCommand {
 public:
  enum class ProtocolVersion
  {
    kVersionUndefinded,
    kVersionFrom_18_2,
    KVersionBefore_18_2
  };

 public:
  JobCommand(const char* msg);
  JobCommand(const JobCommand&) = delete;
  bool EvaluationSuccesful() const;

  uint32_t job_id_ = 0;
  char job_[MAX_NAME_LENGTH];
  uint32_t vol_session_id_ = 0;
  uint32_t vol_session_time_ = 0;
  char sd_auth_key_[MAX_NAME_LENGTH];
  TlsPolicy tls_policy_ = TlsPolicy::kBnetTlsUnknown;

  ProtocolVersion protocol_version_ = ProtocolVersion::kVersionUndefinded;

 private:
  static const std::string jobcmd_;
  static const std::string jobcmdssl_;
};
} /* namespace filedaemon */

#endif /* BAREOS_FILED_EVALUATE_JOB_COMMAND_H_ */
